package com.education.online.controller;


import com.education.common.utils.ApiReturnObject;
import com.education.online.pojo.OBanner;
import com.education.online.service.OBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 广告位轮播
 *
 * @date 2020-06-03 13:54:47
 */
@Api(tags = {"PC--轮播"})
@RestController
@RequestMapping("/pc/obanner")
public class OBannerController {

    @Autowired
    private OBannerService oBannerService;

    @ApiOperation(value = "广告位轮播", httpMethod = "GET")
    @GetMapping("/selectList")
    public ApiReturnObject selectList(){
        List<OBanner> oBannerList = oBannerService.selectOBannerList(null);
        return new ApiReturnObject("200","success",oBannerList.size(),oBannerList);
    }

}
